package cn.childin.consumer.controller;

import cn.childin.consumer.config.Config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhangpeng
 * @since 2023/12/05 16:04
 */
@RestController
public class IndexController {

    @Autowired
    private Config config;

    @GetMapping("/index")
    public String index(String name) {
        System.out.println(config.getName()+":"+config.getGender());
        return String.format("Hello %s", name);
    }


}
